﻿@model ActionResultVM
@{
    ViewData["Title"] = "登录";

    var loginpath = GlobalTo.GetValue("StaticResource:Server") + GlobalTo.GetValue("StaticResource:LoginPath");
}

<link href="/css/account/login.css" rel="stylesheet" asp-append-version="true" />

<div class="vbox">
    <div class="mt-4 text-center d-none d-md-block">
        <a href="/"><img src="/favicon.svg" alt="netnr" /></a>
    </div>
    <div class="my-4 text-center">
        <h4>Sign in to Netnr</h4>
    </div>
    @if (!string.IsNullOrWhiteSpace(Model?.msg))
    {
        <div class="alert alert-danger alert-dismissible fade show">
            <span>@Model?.msg</span>
            <button type="button" class="close" data-dismiss="alert">
                <span aria-hidden="true">&times;</span>
            </button>
        </div>
    }
    <div class="card">
        <div class="card-body">
            <form action="/account/login" method="post">
                @Html.AntiForgeryToken()
                <input type="hidden" name="remember" value="1" />

                <div class="form-group">
                    <label>Username or email address</label>
                    <input type="text" required class="form-control" name="UserName" maxlength="50" placeholder="netnr@@netnr.com" autocomplete="off" autofocus>
                </div>
                <div class="form-group">
                    <label>Password</label>
                    <input type="password" required class="form-control" name="UserPwd" maxlength="20" placeholder="******" autocomplete="off">
                </div>
                <button type="submit" class="btn btn-block btn-success">Sign in</button>
            </form>
            <div class="otherlogin">
                <a href="/account/auth/qq">
                    <img src="@(loginpath+"/qq.svg")" title="QQ" />
                </a>
                <a href="/account/auth/weibo">
                    <img src="@(loginpath+"/weibo.svg")" title="微博" />
                </a>
                <a href="/account/auth/github">
                    <img src="@(loginpath+"/github.svg")" title="GitHub" />
                </a>
                <a href="/account/auth/taobao">
                    <img src="@(loginpath+"/taobao.svg")" title="淘宝/天猫" />
                </a>
                <a href="/account/auth/microsoft">
                    <img src="@(loginpath+"/microsoft.svg")" title="微软" />
                </a>
                <a href="/account/auth/dingtalk">
                    <img src="@(loginpath+"/dingtalk.svg")" title="钉钉" />
                </a>
            </div>
        </div>
    </div>
    <div class="mt-5 text-center pt-5">
        <a class="mx-2" href="/mix/terms">条款</a>
        <a class="mx-2" href="https://ss.netnr.com/contact">联系</a>
        |
        <a class="mx-2" href="/">首页</a>
        <a class="mx-2" href="/account/register">注册</a>
    </div>
</div>